t = 100;
dim = 30;

[xm, fv] = icyPSO(@fitness, 40, 2, 2, 0.5, t, dim)

s = zeros(1, dim);

for index = 1 : dim
  y = 0;
  for indexJ = 1 : dim
    y = y + xm(index) ^ 2 + xm(index);
  end

  s(index) = y;
end

plot(xm, s, '*');
